import { ajax } from '../http.js';

const queryCarUrl = '/authc/cart/find_page';
const deleteCartUrl = '/authc/cart/delete_cart_all';
const changeCartUrl = '/authc/cart/update_cart';


const queryCar = (data, success, fail) => // 购物车查询
  ajax({
    url: queryCarUrl,
    data: data,
    success: success,
    fail: fail
  });

const deleteCart = (data, success, fail) => // 购物车删除
  ajax({
    url: deleteCartUrl,
    data: data,
    success: success,
    fail: fail
  });
const changeCart = (data, success, fail) => // 购物车修改
  ajax({
    url: changeCartUrl,
    data: data,
    success: success,
    fail: fail
  });

export {
  queryCar,
  deleteCart,
  changeCart
}